package com.cj.controller;

import com.cj.service.UserService;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author cc
 * @date 2025-05-12 09:19
 **/
@Controller
@Getter
public class UserController {

    UserService userService;

    /**
     * 当前类只有这一个构造器，，spring在获取当前这个bean对象的时候，，只能调用这个构造器，，这个 userService就是从spring容器中获取的
     * @param userService
     */
    @Autowired
    public UserController(UserService userService) {
        this.userService = userService;
    }


    public UserController() {
    }
}
